From: Marco Trevisan (TreviƱo) Date: Thu, 30 Nov 2017 01:34:42 +0000 (+0100) Subject: loginDialog: Load logo file texture given resource scale X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~888^2^2~57 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=26e3ccda496cb62f0b4e3b6e1edbfbb0f738eac2;p=gnome-shell.git loginDialog: Load logo file texture given resource scale And reload the logo if the resource scale changes. https://bugzilla.gnome.org/show_bug.cgi?id=765011 --- diff --git a/js/gdm/loginDialog.js b/js/gdm/loginDialog.js index bf7577c36..6c4d1357d 100644 --- a/js/gdm/loginDialog.js +++ b/js/gdm/loginDialog.js @@ -481,6 +481,9 @@ var LoginDialog = GObject.registerClass({ this._logoBin = new St.Widget({ style_class: 'login-dialog-logo-bin', x_align: Clutter.ActorAlign.CENTER, y_align: Clutter.ActorAlign.END }); + this._logoBin.connect('resource-scale-changed', () => { + this._updateLogoTexture(this._textureCache, this._logoFile); + }); this.add_child(this._logoBin); this._updateLogo(); @@ -778,12 +781,12 @@ var LoginDialog = GObject.registerClass({ return; this._logoBin.destroy_all_children(); - if (this._logoFile) { + if (this._logoFile && this._logoBin.resource_scale > 0) { let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor; this._logoBin.add_child(this._textureCache.load_file_async(this._logoFile, -1, _LOGO_ICON_HEIGHT, scaleFactor, - 1)); + this._logoBin.resource_scale)); } }